package com.bw.service.goods;
import com.bw.entity.PageResult;
import com.bw.pojo.goods.Sku;
import com.bw.pojo.order.OrderItem;

import java.util.*;

/**
 * sku业务逻辑层
 */
public interface SkuService {


    public List<Sku> findAll();


    public PageResult<Sku> findPage(int page, int size);


    public List<Sku> findList(Map<String,Object> searchMap);

    public List<Sku> sampleList(int size);

    public PageResult<Sku> findPage(Map<String,Object> searchMap,int page, int size);


    public Sku findById(String id);

    public void add(Sku sku);


    public void update(Sku sku);


    public void delete(String id);

    /**
     * 根据购物车批量扣减库存
     * @param orderItemList
     * @return
     */
    public boolean deductionStock(List<OrderItem> orderItemList);
    /**
     * 根据skuName查询
     */
    public Sku findByName(String name);

}
